<template>
	<view class="wanl-success">
		<!-- 导航条 -->
		<view class="cu-custom" :style="{height: wanlsys.height + 'px' }">
			<view class="cu-bar " :style="{ height:( wanlsys.height-10) + 'px', marginTop: (wanlsys.top-5) + 'px'}">
				<view class="action" @tap="onBackUser">
					<image src="../../static/image/icon/fanhuijian.png"></image>
				</view>
				<view class="content" :style="{top: wanlsys.top + 'px'}">
					<text>{{title}}完成</text>
				</view>
			</view>
		</view>	
		<view class="wanl-success_content" :style="{  marginTop: (wanlsys.top+43) + 'px'}">
			<view class="iconfont icon-chenggong"></view>
			<view class="text-lg margin-tb">{{ title }}已成功</view>
			<view class="button padding-xl margin-top-lg">
				<!-- <view class="cu-btn cu-btn_orgin" v-if="type == 'comment'" @tap="$wanlshop.to('../productDetails/productDetails')">查看评论</view> -->
				<view class="cu-btn cu-btn_orgin" v-if="type == 'pay'" @tap="$wanlshop.to('/pages/mines/order/order')">查看订单</view>
				<view class="cu-btn cu-btn_orgin" v-if="type == 'feedback'" @tap="$wanlshop.to('/pages/user/feedback/lists')">查看反馈</view>
				<view class="cu-btn cu-btn_orgin" v-if="type == 'complaint'" @tap="$wanlshop.to('/pages/user/complaint/lists')">查看举报</view>
				<view class="cu-btn cu-btn_orgin" v-if="type == 'withdraw'" @tap="$wanlshop.to('/pages/user/money/witlist')">查看提现列表</view>
				<view class="cu-btn cu-btn_orgin" v-if="type == 'recharge'" @tap="$wanlshop.to('/pages/user/money/money')">查看钱包</view>
				<view class="cu-btn" @tap="onIndex">返回首页</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			wanlsys: this.$wanlshop.wanlsys(),
			type: '',
			title: ''
		};
	},
	onLoad(options) {
		if (options.type == 'pay') {
			this.title = '支付';
		} else if (options.type == 'comment') {
			this.title = '评论';
		} else if (options.type == 'feedback') {
			this.title = '反馈';
		} else if (options.type == 'withdraw') {
			this.title = '请等待后台审核，提交';
		} else if (options.type == 'recharge') {
			this.title = '充值';
		} else if (options.type == 'complaint') {
			this.title = '举报';
		}
		this.type = options.type;
	},
	methods: {
		onIndex() {
			uni.switchTab({
				url:'../homes/home/home'
			});
		},
		onBackUser(){
			uni.switchTab({
			    url: '../mine/mine'
			});
		}
	}
};
</script>

<style lang="scss">
	.wanl-success{
		.cu-custom{
			// background-color: pink;
			position: fixed;
			left: 0;
			top: 0;
			right: 0;
			box-sizing: border-box;
			.cu-bar{
				display: flex;
				align-items: center;
				// background-color: red;
				box-sizing: border-box;
				.action{
					// background-color: #007AFF;
					margin-left: 10rpx;
					width: 50rpx;
					height: 50rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					image{
						width:30rpx;
						height: 35rpx;
					}
				}
				.content{
					width:700rpx;
					text-align:center;
					font-size: 28rpx;
					
					// background-color: #1CBBB4;
					text{
						// background-color: #39B54A;
						display: inline-block;
						
					}
				}
			}
		}
	.wanl-success_content{
		// background-color: red;
		// height: 400rpx;
		overflow: hidden;
		.iconfont{
			margin: 200rpx auto 10rpx;
			font-size: 200rpx;
			color: #39B54A;
			text-align: center;
		}
		.text-lg{
			font-size: 28rpx;
			color: #282828;
			text-align: center;
		}
		.button{
			// background-color: #007AFF;
			margin-top: 150rpx;
			.cu-btn{
				width: 650rpx;
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				border: 1px solid #999999;
				border-radius: 10rpx;
				font-size: 30rpx;
				color:#999999 ;
				margin:0 auto ;
			}
			.cu-btn_orgin{
				margin-bottom: 20rpx;
				color: white;
				border: none;
				background-image: linear-gradient(-90deg, #ff4950 0, #ff8123 100%);
			}
		}
	}
	}

.wanl-success .content .icon {
	font-size: 180rpx;
	color: #3aa112;
	margin-top: 150rpx;
}
.wanl-success .content .button {
	width: 100%;
}
</style>
